<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>BOM-location</title>
  <script>
    // console.log(window.location === document.location);
    // console.log(location);
    window.onload = function() {
      var btns = document.getElementsByTagName('button')
      btns[0].onclick = function() {
        // location.assign('./1-超时调用-间歇调用.html')
        // location.replace('./1-超时调用-间歇调用.html')
        // location.href = './1-超时调用-间歇调用.html'
        // 前进一步
        // history.forward()
        history.go(1)
        
      }
      btns[1].onclick = function() {
        // 后退一步
        history.back()
      }
      btns[2].onclick = function() {
        // 页面重载
        location.reload(true)
      }
      btns[3].onclick = function() {
        window.open('./1-超时调用-间歇调用.html')
      }
    }
  </script>
</head>
<body>
  <button>下一页</button>
  <button>上一页</button>
  <button>刷新</button>
  <button>新窗口</button>
</body>
</html>